import {DEMO_ACTION_TYPE} from '@/constant/actionType';
const initialState = {
    demoData: null,
};
export default (state = initialState, action) => {
    switch (action.type) {
        case DEMO_ACTION_TYPE.TEST:
            return {
                ...state,
                demoData: action.value,
            };
        default:
            return state;
    }
};
export const demoAction = () => (
    async (dispatch) => {
        try {
            dispatch({
                type: DEMO_ACTION_TYPE.TEST,
                value: 'demo test ===>',
            });
        } catch (err) {
            throw err;
        }
    }
);
